<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Test</title>
		<script src="assets/js/jquery.min.js" type="text/javascript"></script>
		<script src="assets/js/jquery.localize.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<a href="javascript:void(0);" class="changelang" data-lang="en">EN</a> |
		<a href="javascript:void(0);" class="changelang" data-lang="bn">BN</a>
		<h1 data-localize="welcome-heading">স্বাগতম!</h1>
		<p data-localize="welcome-text">এটি একটি বাংলা বাক্য।</p>
		<script type="text/javascript" charset="utf-8">
			$(function(){
				// Sets the language of html elements.
				// lang: Language code. Ex: en, bn-BD etc.
				// initialRun: If set to true, the default language won't be reapplied
				//     to save time.
				function changeLanguage(lang, initialRun=false) {
					//var opts = { language: lang, pathPrefix: "lang", skipLanguage: "bn" };
					var opts = { language: lang, pathPrefix: "lang" };
					if (lang == 'bn' && initialRun == true) {
						opts.skipLanguage = 'bn';
					}
					$("[data-localize]").localize("test", opts);
				}
				changeLanguage('bn', true);

				$('.changelang').click(function(){
					var lang = $(this).attr('data-lang');
					changeLanguage(lang);
				});
			})
		</script>
	</body>
</html>